package com.nf.service;

import com.nf.dao.UserDao;
import com.nf.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service
@Scope("prototype")
public class UserServiceImpl implements UserService{
    @Autowired
    private UserDao userDao=null;

    public String getUserNameById(String id) {
        User user=userDao.getUserById(id);
        if ("123456".equals(user.getUserPassword())){
            return user.getUserName()+"123456";
        }
        else{
            return user.getUserName();
        }
    }
}
